#include<bits/stdc++.h>
using namespace std;
string y[200005],y1[200005];
int main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	int n,m;
	cin>>n>>m;
	for (int i=1;i<=n;i++){
		cin>>y[i]>>y1[i];
	}
	while(m--){
		int num=0;
		string x,y;
		cin>>x>>y;
		for (int i=0;i<x.size();i++){
			for (int j=i+1;j<x.size();j++){
				for (int k=1;k<=n;k++){
					
				}
			}
		}
	}
	fclose(stdin);
	fclose(stdout);
	
	return 0;
} 
